app.service('z-schedulWeek-s', [
		'$rootScope',
		'$z-http',
		'ZModel',
		function($rootScope, $http, ZModel) {
			var service = {
					getSchedulWeekBySwId : function(data,success,fault) {
						$http.post("schedulWeek/getSchedulWeekBySwId.do",
							$.param(data),
							{headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}}
							).success(function(data) {
								success(data.success);
			  				}).error(function(data) {
			  					if(fault) {
			  						fault(data);
			  				}
		  				});
					},
					getSchedulWeekList : function(data,success,fault) {
						$http.post("schedulWeek/getSchedulWeekList.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					saveSchedulWeek : function(data,success,fault) {
						$http.post("schedulWeek/saveSchedulWeek.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					updateSchedulWeek : function(data,success,fault) {
						$http.post("schedulWeek/updateSchedulWeek.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					batchPunchTime : function(data,success,fault) {
						$http.post("schedulWeek/batchPunchTime.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					deleteSchedulWeek : function(data,success,fault) {
						$http.post("schedulWeek/deleteSchedulWeek.do",
							$.param(data),
							{headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}}
							).success(function(data) {
								success(data.success);
			  				}).error(function(data) {
			  					if(fault) {
			  						fault(data);
			  				}
		  				});
					},
					getVerifySchedulWeek : function(data,success,fault) {
						$http.post("schedulWeek/getVerifySchedulWeek.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					getSchedulWeekEmployeeDetailedList : function(data,success,fault) {
						$http.post("schedulWeek/getSchedulWeekEmployeeDetailedList.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					getSchedulWeekEmployeeListBySwId : function(data,success,fault) {
						$http.post("schedulWeek/getSchedulWeekEmployeeListBySwId.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
					getTemplateUrl:function (success, fault) {
		                $http.get("schedulWeek/downloadSchedulWeekURL.do", {//TODO change
		                    headers: {
		                        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
		                    }
		                }).success(success).error(fault);
		            },
		            schedulWeekImport:function (data, success, fault) {
		                $http.post("schedulWeek/schedulWeekImport.do",
		                    $.param(data), {
		                        headers: {
		                            'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
		                        }
		                    }).success(success).error(fault);
		            },
		            getSchedulWeekURL : function(data,success,fault) {
						$http.post("schedulWeek/getSchedulWeekURL.do",data)
						.success(function(data) {
							success(data.success);
		  				}).error(function(data) {
	  						fault(data);
		  				});
					},
			};
			return service;
		} ]);